﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {
        path: '/user/login',
        layout: false,
        name: '登录',
        component: './user/login',
      },
      {
        path: '/user',
        redirect: '/user/login',
      },
      {
        name: '注册结果',
        icon: 'smile',
        path: '/user/register-result',
        component: './user/register-result',
      },
      {
        name: '注册',
        icon: 'smile',
        path: '/user/register',
        component: './user/register',
      },
      {
        component: '404',
        path: '/user/*',
      },
    ],
  },
  {
    path: '/',
    redirect: '/dashboard',
  },
  {
    component: '404',
    path: '/*',
  },
  {
    name: '数据看板',
    icon: 'dashboard',
    path: '/dashboard',
    component: './dashboard/analysis',
    menuCode: '000003', // 权限控制
    access: 'canAccessMenu',
  },
  {
    path: '/home',
    icon: 'home',
    name: '首页',
    menuCode: '000004', // 权限控制仅在父级添加
    access: 'canAccessMenu', 
    routes: [
      {
        name: '轮播图',
        icon: 'picture',
        path: '/home/articles',
        component: './home/table-list',
      },
      {
        name: '首页基本信息',
        icon: 'page',
        path: '/home/page',
        component: './home/home-page',
      },
      {
        name: '网站底部信息配置',
        icon: 'foot',
        path: '/home/foot',
        component: './home/home-foot',
      },
    ],
  },
  {
    path: '/news',
    icon: 'global',
    name: '新闻管理',
    routes: [
      {
        name: '新闻列表',
        icon: 'unordered-list',
        path: '/news/articles',
        component: './news/table-list',
        menuCode: '000005', // 权限控制
        access: 'canAccessMenu',
      },
      {
        name: '标签管理',
        icon: 'unordered-list',
        path: '/news/label',
        component: './news/table-label',
      },
    ],
  },
  {
    path: '/product',
    icon: 'appstore',
    name: '产品服务',
    menuCode: '000006', // 权限控制
    access: 'canAccessMenu',
    routes: [
      {
        name: '服务列表',
        icon: 'unordered-list',
        path: '/product/articles',
        component: './product/table-list',
      },
      {
        name: '产品说明',
        icon: 'api',
        path: '/product/api',
        component: './product/product-api',
      },
      {
        name: '产品API',
        icon: 'api',
        path: '/product/card',
        component: './product/table-config',
      },
      {
        name: '产品选购API',
        icon: 'api',
        path: '/product/purchase',
        component: './product/purchase',
      },
    ],
  },
  {
    path: '/solution',
    icon: 'solution',
    name: '解决方案',
    routes: [
      {
        name: '解决方案列表',
        icon: 'unordered-list',
        path: '/solution/articles',
        component: './solution/table-list',
        menuCode: '000007', // 权限控制
        access: 'canAccessMenu',
      },
    ],
  },
  {
    path: '/about',
    icon: 'info',
    name: '关于我们',
    routes: [
      {
        name: '关于我们列表',
        icon: 'unordered-list',
        path: '/about/articles',
        component: './about/table-list',
        menuCode: '000007702', // 权限控制
        access: 'canAccessMenu',
      },
    ],
  },
  {
    path: '/feedback',
    icon: 'message',
    name: '意见反馈',
    routes: [
      {
        name: '意见反馈列表',
        icon: 'unordered-list',
        path: '/feedback/articles',
        component: './feedback/table-list',
        menuCode: '000008', // 权限控制
        access: 'canAccessMenu',
      },
    ],
  },
  {
    path: '/support',
    icon: 'question',
    name: '支持与帮助',
    routes: [
      {
        name: '支持与帮助列表',
        icon: 'unordered-list',
        path: '/support/articles',
        component: './support/table-list',
        menuCode: '000009', // 权限控制
        access: 'canAccessMenu',
      },
    ],
  },
  {
    path: '/system',
    icon: 'setting',
    name: '系统管理',
    routes: [
      {
        name: '角色管理',
        icon: 'user',
        path: '/system/role-management',
        component: './system/role-management',

      },
      {
        name: '部门管理',
        icon: 'team',
        path: '/system/department-management',
        component: './system/department-management',
      },
      {
        name: '菜单管理',
        icon: 'team',
        path: '/system/menu-management',
        component: './system/menu-management',
      },
      {
        name: '字典管理',
        icon: 'dictionary',
        path: '/system/dictionary',
        component: './system/data-dictionary',
      },
      {
        name: '用户列表',
        icon: 'unordered-list',
        path: '/system/articles',
        component: './user/table-list',
      },
    ],
  },
  {
    name: '客户管理',
    icon: 'user',
    path: '/user/client',
    component: './user/user-client',
    menuCode: '000011', // 权限控制
    access: 'canAccessMenu',
  },
  {
    path: '/approval',
    icon: 'audit',
    name: '审批管理',
    menuCode: '000012', // 权限控制
    access: 'canAccessMenu',
    routes: [
      {
        name: '改价列表',
        icon: 'unordered-list',
        path: '/approval/list/1',
        component: './approval/price-change',
      },
      {
        name: '退款列表',
        icon: 'unordered-list',
        path: '/approval/list/2',
        component: './approval/refund',
      },
      {
        name: '审批配置',
        icon: 'rule',
        path: '/approval/rules',
        component: './approval/approval-rules',
      },
    ],
  },
  {
    path: '/order',
    icon: 'shopping',
    name: '订单管理',
    menuCode: '000013', // 权限控制
    access: 'canAccessMenu',
    routes: [
      {
        name: '订单列表',
        icon: 'unordered-list',
        path: '/order/list',
        component: './order/order-list',
      },
    ],
  },
  {
    path: '/invoice',
    icon: 'file',
    name: '发票管理',
    menuCode: '000014', // 权限控制
    access: 'canAccessMenu',
    routes: [
      {
        name: '发票列表',
        icon: 'unordered-list',
        path: '/invoice/list',
        component: './invoice/invoice-list',
      },
    ],
  },
  {
    path: '/finance',
    icon: 'bank',
    name: '财务统计',
    menuCode: '000015', // 权限控制
    access: 'canAccessMenu',
    routes: [
      {
        name: '财务统计',
        icon: 'bar-chart',
        path: '/finance/statistics',
        component: './finance/finance-statistics',
      },
    ],
  },
  {
    path: '/basic-config',
    icon: 'tool',
    name: '基础配置',
    menuCode: '000016', // 权限控制
    access: 'canAccessMenu',
    routes: [
      {
        name: '协议列表',
        icon: 'unordered-list',
        path: '/basic-config/list',
        component: './basic-config/config-list',
      },
      {
        name: '友情链接',
        icon: 'unordered-list',
        path: '/basic-config/connection',
        component: './basic-config/connection-list',
      },
    ],
  },
  {
    path: '/work-order',
    icon: 'snippets',
    name: '电子工单',
    menuCode: '000017', // 权限控制
    access: 'canAccessMenu',
    routes: [
      {
        name: '工单列表',
        icon: 'unordered-list',
        path: '/work-order/list',
        component: './work-order/work-order-list',
      },
    ],
  },
  {
    path: '/seo',
    icon: 'search',
    name: 'SEO管理',
    menuCode: '000018', // 权限控制
    access: 'canAccessMenu',
    routes: [
      {
        name: 'SEO列表',
        icon: 'unordered-list',
        path: '/seo/list',
        component: './seo/list',
      },
    ],
  },
];
